/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVASE Song Huongkang PROJECT
 * All Rights Reserved.
 */

package 练习.银行账户管理;
/**
 * @description 
 * @param 
 * @return  
 * @author 俊昭        
 * @date 2022/3/26
*/
public class BankAccountTest{
    public static void main(String[] args) {
        Account a1 =new Account(1001,2000,0.0123);
        Customer Jane_Smith =new Customer("Jane","Smith");
        Jane_Smith.setAccount(a1);
        System.out.println(Jane_Smith.getFirstName() + Jane_Smith.getLastName() + Jane_Smith.getAccount().getId()+
                Jane_Smith.getAccount().getBalance() + Jane_Smith.getAccount().getAnnualInterestRate()*100+"%");
        a1.drawMoney(960);
        a1.saveMoney(100);
        Jane_Smith.setAccount(a1);
        System.out.println(Jane_Smith.getFirstName() + Jane_Smith.getLastName() + Jane_Smith.getAccount().getId()+
                Jane_Smith.getAccount().getBalance() + Jane_Smith.getAccount().getAnnualInterestRate()*100+"%");
        Bank bank =new Bank();
        bank.addCustomer("Jane","Smith");
        bank.getCustomer(0).setAccount(a1);
        System.out.println(bank.getCustomer(0).getAccount().getBalance());
    }
}

